#ifndef MY_USRP_HPP
#define MY_USRP_HPP
#include <uhd/usrp/multi_usrp.hpp>
#include "main.hpp"

#define BUFF_SIZE 200   // size of slots in buff
extern uint64_t symbols_in_buff;
extern short *buff;
class MY_USRP
{
private:
    char usrp_address[255] = "serial=1710022";
    std::string ref;   // clock reference
    double clock_rate; // clock frequence
    double samp_rate;  // sampling rate
    double tx_freq;    // tx center freq
    double tx_gain;    // tx gain
    // std::complex<double> *buff;
    uhd::tx_streamer::sptr tx_stream;
    uhd::tx_metadata_t md;
    uhd::usrp::multi_usrp::sptr usrp;

	uhd::time_spec_t usrptime;
    uhd::time_spec_t aaa;
    uhd::async_metadata_t async_md;
    int first_flag = 0;
    int64_t app_start_tick;
    int64_t tx_start_tick;
    int64_t tick;

public:
    MY_USRP();
    ~MY_USRP();
    void my_usrp_tx(); // Loop sending one slot
    // void runThread();
};
#endif
